/**
 * 非法信息 API
 * @type {MoIllegalInfoApi}
 */
const moIllegalInfoApi = new class MoIllegalInfoApi extends BaseApi {
    constructor() {
        super({
            url: '/api/moIllegalInfo',
            exp: true,
        })
    }

    async dealBatch(idList) {
        return (await rxajax.post(this.using('/handle-batch'), idList, {
            type: 'json',
        })).data
    }

    async dealCancelBatch(idList) {
        return (await rxajax.post(this.using('/cancel-handle-batch'), idList, {
            type: 'json',
        })).data
    }

    async setTrust(idList) {
        return (await rxajax.post(this.using('/set-trust'), idList, {
            type: 'json',
        })).data
    }

    /**
     * 分组统计
     * @param page 分页信息
     * @param entity 实体参数
     * @returns {Promise.<Result.<Page.<MoIllegalInfo>>>} 分页数据
     */
    async pageCount(page, entity) {
        return await rxajax.page(this.using('/query-page-count'), page, entity)
    }

    async notDealTotal() {
        return (await rxajax.get(this.using('/not-deal-total'))).data.data
    }

    /**
     * 警示榜表格信息
     * @returns {Promise<*>}
     */
    async warnList() {
        return (await rxajax.get(this.using('/warn-list'))).data.data
    }
}()